package com.sanyu.controller.admin;

import com.sanyu.pojo.dto.WorkRecordPageQueryDTO;
import com.sanyu.pojo.dto.WorkRecordVerifyDTO;
import com.sanyu.pojo.dto.RepairRecordPageQueryDTO;
import com.sanyu.pojo.vo.WorkRecordVO;
import com.sanyu.result.PageResult;
import com.sanyu.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/workRecord")
@Api("后台管理页面/工单管理相关接口")
public class WorkRecordController {

    @GetMapping("/page")
    @ApiOperation("分页查询工单")
    public Result<PageResult> page(WorkRecordPageQueryDTO workRecordPageQueryDTO){
        return Result.success(new PageResult());
    }

    @GetMapping("/{id}")
    @ApiOperation("根据ID获取工单详细信息")
    public Result<WorkRecordVO> detail(@PathVariable Long id){
        WorkRecordVO workRecordVO = new WorkRecordVO();
        return Result.success(workRecordVO);
    }

    @PostMapping("/verify")
    @ApiOperation("完成某一工单审核")
    public Result verify(@RequestBody WorkRecordVerifyDTO workRecordVerifyDTO){
        return Result.success();
    }
}
